import { Message } from 'element-ui'
import router from '@/router'

/*export default (data)=>{
    Message({
      message: data.message||"没有传入提示消息",
      type: data.type||"info",
      duration: data.time||5 * 1000
    })
}*/

export default {
	info(msg,time){
		Message({
	      message: msg||"没有传入提示消息",
	      type:"info",
	      duration: time||5 * 1000
	    })
	},
	err(msg,time){
		Message({
	      message: msg||"没有传入提示消息",
	      type:"error",
	      duration: time||5 * 1000
	    })
	},
	success(msg,time){
		Message({
	      message: msg||"没有传入提示消息",
	      type:"success",
	      duration: time||5 * 1000
	    })
	},
	warning(msg,time){
		Message({
	      message: msg||"没有传入提示消息",
	      type:"warning",
	      duration: time||5 * 1000
	    })
	}
}
